using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using HollywoodHackers.Storage.Table;
using Microsoft.Samples.ServiceHosting.StorageClient;

namespace HollywoodHackers.Web.Controllers
{
    public class ToastController : Controller
    {
        //
        // GET: /Toast/

        public ActionResult Index()
        {
            StorageAccountInfo table = StorageAccountInfo.GetDefaultTableStorageAccountFromConfiguration();
            UserNotificationRepository toastRepo = new UserNotificationRepository(null, null,
                table);

            UserTextNotification[] toasts = toastRepo.GetNotifications(User.Identity.Name);
            return View(toasts);
        }

    }
}
